Skip to content

Conversation

@fabrizio-rar
Copy link
Contributor

This PR implements the changes requested in here

We are now firing an initial change event when we start a view and we are polling to check for changes in the network, if the connection type changes, we fire a networkchange event containing the connection type

prototype.beaconIntervalHandler = sub(beaconIntervalEvent)
data = beaconIntervalEvent.getData()
m.updateSessionPropertiesConnectionType()
m._checkNetworkChange()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use EnableLinkStatusEvent and/or EnableInternetStatusEvent for this instead of just checking on the beacon interval?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest something like this if it would work, as well, so we don't have a rendezvous every time we check the beacon interval. I know with the other performance improvements we've helped, but it would be good to not add back in rendezvous if we don't have to

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I pushed an update adding support for EnableLinkStatusEvent and EnableInternetStatusEvent.

If those aren't supported (Roku < 10), it falls back to polling. I kept the polling aligned with the beacon interval so we don't check too frequently.

I tested switching between Wi-Fi and Ethernet, as well as connecting/disconnecting Ethernet, and the events were received correctly.

The only thing I haven't been able to observe in the logs is GetConnectionType returning "".
When disconnecting and reconnecting Ethernet, Roku still reports "wired", although I do see from the EnableInternetStatusEvent that internet access goes to false briefly.

Let me know if you think I should adjust anything further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants